package org.example;

/**
 * 课程实体类，存储课程基本信息
 */
public class Course {
    private String courseId;    // 课程编号
    private String courseName;  // 课程名称
    private String prerequisite;// 前置知识

    // 构造方法
    public Course(String courseId, String courseName, String prerequisite) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.prerequisite = prerequisite;
    }

    // Getters和Setters
    public String getCourseId() { return courseId; }
    public void setCourseId(String courseId) { this.courseId = courseId; }

    public String getCourseName() { return courseName; }
    public void setCourseName(String courseName) { this.courseName = courseName; }

    public String getPrerequisite() { return prerequisite; }
    public void setPrerequisite(String prerequisite) { this.prerequisite = prerequisite; }

    @Override
    public String toString() {
        return "Course{" +
                "courseId='" + courseId + '\'' +
                ", courseName='" + courseName + '\'' +
                ", prerequisite='" + prerequisite + '\'' +
                '}';
    }
}